package com.xy.biz.ts.domain.converter;

import java.util.Collection;
import java.util.List;

import com.xy.tool.util.BeanUtilsEx;
import com.xy.biz.ts.domain.bo.TrainDocumentRelBO;
import com.xy.biz.ts.domain.po.TrainDocumentRelPO;
import com.xy.biz.ts.domain.query.TrainDocumentRelQuery;
//import com.xy.biz.ts.domain.resp.GetTrainDocumentRelResponse;
//import com.xy.biz.ts.domain.req.SaveTrainDocumentRelRequest;
//import com.xy.biz.ts.domain.req.ListTrainDocumentRelRequest;

/**
 *
 *
 * @author wwj
 * @date 2021-4-2
 */
public class TrainDocumentRelConverter {

	public static TrainDocumentRelPO toPO(TrainDocumentRelBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new TrainDocumentRelPO(), true);
	}

	public static List<TrainDocumentRelPO> toPO(Collection<TrainDocumentRelBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainDocumentRelPO(), true);
	}

	public static TrainDocumentRelBO fromPO(TrainDocumentRelPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new TrainDocumentRelBO());
	}

	public static List<TrainDocumentRelBO> fromPO(Collection<TrainDocumentRelPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainDocumentRelBO());
	}

//	public static TrainDocumentRelBO toBO(SaveTrainDocumentRelRequest source) {
//		return BeanUtilsEx.copyProperties(source, () -> new TrainDocumentRelBO(), true);
//	}
//
//	public static List<TrainDocumentRelBO> toBO(Collection<SaveTrainDocumentRelRequest> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new TrainDocumentRelBO(), true);
//	}
//
//	public static GetTrainDocumentRelResponse toResponse(TrainDocumentRelBO source) {
//		return BeanUtilsEx.copyProperties(source, () -> new GetTrainDocumentRelResponse());
//	}
//
//	public static List<GetTrainDocumentRelResponse> toResponse(Collection<TrainDocumentRelBO> source) {
//		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new GetTrainDocumentRelResponse());
//	}
//
//	public static TrainDocumentRelQuery toQuery(ListTrainDocumentRelRequest source) {
//		if(null == source) {
//			return null;
//		}
//		TrainDocumentRelQuery target = new TrainDocumentRelQuery(source.getPageIndex(), source.getPageSize());
//		BeanUtilsEx.copyProperties(source, target);
//		return target;
//	}

}
